Magnetic field sensor

ABSTRACT

A magnetic field sensor assembly ( 401   a   , 401   b ) for measuring an angular direction (φ) of a sensed magnetic field (H appl ) relative to the assembly, the sensor assembly comprising: a sensor ( 404   a,    404   b ) of a first type configured to sense an orientation of the sensed magnetic field; a sensor ( 402, 406 ) of a second type configured to measure an orientation and a direction of the sensed magnetic field; and processing circuitry ( 403, 405 ) connected to each of the magnetic field sensors, the processing circuitry being configured to process output signals from the sensor of the first type to determine an uncorrected sensed magnetic field angle and to apply an offset angle to the uncorrected magnetic field angle dependent on a logical combination of signs of output signals from the sensors of the first and second types.

The invention relates to the field of magnetic sensors, and in particular to magnetic field sensors for determining the direction of a magnetic field.

Magnetic sensors are increasingly important in various industries. In the automotive industry sensors in particular, various sensors such as parking sensors, ABS (Automatic Braking System) sensors and tyre pressure sensors can be found in modern vehicles for improving comfort and safety. Magnetic sensors are particularly important in automotive applications, because magnetic fields penetrate easily through most materials. Magnetic sensors are also highly insensitive to dirt, unlike for example optical sensors. In many applications an angle must be measured, sometimes over a small range but often over more than 180° or over the full 360°. A full range of measurement is necessary for example in determining the absolute position of the rotor of a brushless motor or the crankshaft of an internal combustion engine.

Several different magnetic sensor technologies are currently available, such as sensors based on the Hall effect or the magnetoresistive effect. Anisotropic magnetoresistive (AMR) and giant magnetoresistive (GMR) sensors are particular examples of sensor types based on the magnetoresistive effect. Hall effect sensors can be integrated monolithically into integrated circuits, which makes them cheap, but they are also known for their low sensitivity and consequent inaccuracy. AMR sensors, while having a much higher sensitivity compared to Hall effect sensors, require more fabrication steps because they cannot be integrated monolithically, making a total sensor system more expensive. AMR sensors can be deposited, usually by sputtering of Ni₈₀Fe₂₀ on a separate die or on top of a monolithic structure. An annealing process, sometimes in a magnetic field, is used for stabilisation of the magneto-resistive material. Furthermore, simple AMR sensors do not have a 360° capability, as they cannot detect the sign of an applied magnetic field, only the orientation relative to the sensor.

As used herein, the term ‘orientation’ relates to the angle a magnetic field makes with a sensing axis, but without an indication of the direction of the field, i.e. its polarity. An angle of orientation will consequently have a maximum range of 180 degrees, whether this is from 0 to 180 degrees, −90 to +90 degrees or some other range spanning the same total. The term ‘direction’, on the other hand, relates to the polarity as well as the orientation of the magnetic field. An angle of direction therefore spans the full 360 degree range.

GMR sensors, which have a high sensitivity, are also able to distinguish the direction of a magnetic field. The application of GMR sensors therefore solves the problem of how to more accurately determine the direction and orientation of an applied magnetic field. GMR sensors will typically have a higher sensitivity than AMR sensors. However, a GMR sensor consists of various thin layers and critical interfaces. The technology required to fabricate such sensors is considerably more complicated and expensive. Furthermore, due to the thin multiple layers making up a GMR sensor, the operating temperature range is also limited.

In applications such as angular sensors, AMR sensors typically have the optimum trade-off between cost and sensitivity. Ordinary AMR sensors, however, lack the capability of carrying out a full 360° measurement.

A typical configuration for a pair of AMR sensor bridges is shown in FIG. 1. The sensor bridges 101, 102 each comprise one or more AMR sensors. The bridge 102 in FIG. 1 b is rotated by 45 degrees with respect to the bridge 101 in FIG. 1 a. Both bridges can be deposited on a single substrate 103 as sketched in FIG. 1 c. The orientation of each resistive element relative to an x-axis indicated in FIG. 1 d is also shown next to each element in FIGS. 1 a and 1 b. In the bridge of FIG. 1 a, the resistive elements are oriented either 0 or 90 degrees to the x axis, and the resistive elements in the bridge of FIG. 1 b are oriented either +45 or −45 degrees relative to the x axis. The voltages across each bridge, V_(c2), V_(s2), relative to an applied voltage V_(o), are given by the following relationships: V _(c2) /V ₀ =ΔR/R ₀=(½)(ΔR _(max) /R ₀) cos(2θ_(Mx)) V _(s2) /V ₀ =ΔR/R ₀=(½)(ΔR _(max) /R ₀) sin(2θ_(Mx))

Each AMR sensor in the bridge has a resistance, R, given by the following relationship: R=R ₀ +ΔR=R ₀ +ΔR _(max) cos² (θ_(Mj))=R ₀+(½)ΔR _(max)+(½)ΔR _(max) cos(2θ_(Mj))

where θ_(Mj) is the angle between magnetization M and current j.

In describing operation of a bridge configuration, it is convenient to use the x axis as a reference instead of the current direction and to introduce the angle between magnetization and the x axis, θ_(Mx), as shown in FIG. 1 d. In the branches of the bridge 101 of FIG. 1 a, θ _(Mj)=θ_(Mx) and θ_(Mj)=θ_(Mx)+90°, while in the rotated bridge 102 of FIG. 1 b, θ _(Mj)=θ_(Mx)±45°. Due to the double angle, 2θ_(Mj), in the above relationship for R, each 90° rotation of the bridge results in change of sign of the varying term, while a 45° rotation results in the term being a ±sine term instead of a cosine term. This leads, for the bridge 101 of FIG. 1 a, to an output voltage V_(c2) given by the following relationship: V _(c2) /V ₀ =ΔR/R ₀=(½)(ΔR/R ₀)cos(2θ_(Mx))

and for the 45° rotated bridge 102 to an output voltage V_(s2) given by the following relationship: V _(s2) /V ₀ =ΔR/R ₀=(½)(ΔR _(max) /R ₀)sin(2θ_(Mx)).

When only 1 or 2 of the resistance elements in a bridge is an AMR sensor, a comparably lower bridge voltage variation results.

For large applied fields with respect to anisotropy and demagnetizing fields, θ_(Mx)→φ, where φ is the angle between the magnetic field H_(appl) and the x axis (FIG. 1 d). The ratio between the bridge output voltages then becomes: V _(s2) /V _(c2)=sin(2θ_(Mx))/cos(2θ_(Mx))=tan(2θ_(Mx))→tan(2φ).

So, the angle of the applied field with respect to the x axis follows for large fields from: φ→(½)arctan(V _(s2) /V _(e2)).

Note that the output is not dependent from the pre-factors in the bridge voltages, provided that matched bridges are used.

Since the arctan (or tan⁻¹) function above is defined between −90° and +90°, the (½) arctan function ranges from −45° to +45°. Four possible values for φ therefore result when taking measurements over the full 360° range. By taking account of the signs of V_(s2) and V_(c2), the arctan range can be extended to the full 360° so that the (½) arctan range becomes 180°. This means that by knowing both V_(s2) and V_(c2), it is possible to reduce the number of possible values of φ to two, one being close to the actual value φ and the other close to φ+180°. A pair of bridges using AMR sensors alone cannot, however, distinguish between these two values.

U.S. Pat. No. 6,212,783 B1 discloses the application of a Hall sensor in combination with a magnetoresistive sensor to determine the actual angular value of the direction of a magnetic field. A single Hall sensor is used, in the form of a Hall plate capable in measuring the field component perpendicular to the plate, i.e. parallel to the z-axis. This use of a single Hall sensor has the disadvantage that, near to 0° and 180°, the angle detection is ambiguous. Although this problem may be worked around, as stated in U.S. Pat. No. 6,212,783 B1 by any ambiguities being oriented to relate to the top dead centre points of the engine, these ambiguities still remain in the output signals of the sensor.

It is consequently an object of the invention to overcome such ambiguities in a magnetic sensor system, while avoiding the additional cost and complexity of GMR sensor-based systems.

According to the first aspect of the invention there is provided a magnetic field sensor assembly for measuring an angular direction of a sensed magnetic field relative to the assembly, the sensor assembly comprising:

-   -   a sensor of a first type configured to sense an orientation of         the sensed magnetic field;     -   a sensor of a second type configured to measure an orientation         and a direction of the sensed magnetic field; and     -   processing circuitry connected to each of the magnetic field         sensors, the processing circuitry being configured to process         output signals from the sensor of the first type to determine an         uncorrected sensed magnetic field angle and to apply an offset         angle to the uncorrected magnetic field angle dependent on a         logical combination of signs of output signals from the sensors         of the first and second types.

The sensor of the first type preferably comprises first and second sensor bridges having magnetic field sensing axes oriented at an angle relative to each other. The sensor bridges preferably each comprise one or more magnetoresistive elements. The sensor bridges may be oriented at approximately 45 degrees relative to each other. The magnetoresistive elements are preferably anisotropic magnetoresistive sensors.

The sensor of the second type preferably comprises first and second sensors having magnetic field sensing axes oriented substantially orthogonally relative to each other. In certain embodiments, however, it may be preferable for the magnetic field sensing axes of the first and second sensors of the second type to be oriented at angles other than 90 degrees relative to one another. The sensor of the second type preferably comprises one or more Hall effect sensor, and may for example comprise two such sensors oriented at an angle to one another.

The sensor of the second type may alternatively comprise two or more anisotropic magnetoresistive sensor elements having electrodes comprising electrically conductive stripes oriented at an angle to the length direction of each sensor so as to direct electrical current to pass through each sensor at 45 degrees with respect to the length direction of each sensor element.

The uncorrected magnetic field angle determined by the processing circuitry preferably has a 180 degree range, and the processing circuitry is configured to apply an offset angle of 180 degrees when a logical combination of the signs of the output signals indicate the sensed magnetic field is oriented between 180 and 360 degrees relative to the assembly.

The logical combination may be expressed as follows:

-   -   !Dc2 AND !Ds2 AND Ds1; OR     -   Dc2 AND !Ds2 AND !Dc1; OR     -   Dc2 AND Ds2 AND !Dc1; OR     -   !Dc2 AND Ds2 AND !Ds1,

where Dc2 and Ds2 are logical values indicating the sign of the output signals from first and second sensors of the first type and where Dc1 and Ds1 are logical values indicating the sign of output signals from first and second sensors of the second type, with !Dc1, !Ds1, !Dc2 and !Ds2 being the logical inverse of Dc1, Ds1, Dc2 and Ds2 respectively.

The uncorrected magnetic field angle determined by the processing circuitry may alternatively have a 90 degree range and the processing circuitry is configured to apply an offset angle of one of 90, 180, 270 and 360 degrees when a logical combination of the signs of the output signals indicate the sensed magnetic field is oriented between 45 and 135 degrees, 135 and 225 degrees, 225 and 315 degrees and 315 and 360 degrees respectively relative to the assembly.

In the above case, the processing circuitry may be configured to:

-   -   apply an offset angle of 90 degrees when the logical combination         is ((!Dc2 AND Ds2) OR (!Dc2 AND !Ds2)) AND Ds1;     -   apply an offset angle of 180 degrees when the logical         combination is ((Dc2 AND !Ds2) OR (Dc2 AND Ds2)) AND !Dc1;     -   apply an offset angle of 270 degrees when the logical         combination is ((!Dc2 AND Ds2) OR (!Dc2 AND !Ds2)) AND !Ds1; and     -   apply an offset angle of 360 degrees when the logical         combination is Dc2 AND !Ds2 AND Dc1,

where Dc2 and Ds2 are logical values indicating the sign of the output signals from first and second sensors of the first type and where Dc1 and Ds1 are logical values indicating the sign of output signals from the first and second sensors of the second type, with !Dc1, !Ds1, !Dc2 and !Ds2 being the logical inverse of Dc1, Ds1, Dc2 and Ds2 respectively.

According to a second aspect of the invention there is provided a method of measuring an angular direction of a magnetic field, the method comprising:

-   -   measuring an orientation of the magnetic field with a sensor of         a first type;     -   measuring an orientation and a direction of the magnetic field         with a sensor of a second type;     -   processing output signals from the sensor of the first type to         determine an uncorrected sensed magnetic field angle; and     -   applying an offset angle to the uncorrected magnetic field angle         dependent on a logical combination of signs of output signals         from the sensors of the first and second types to obtain an         output signal of the angular direction of the magnetic field.

An advantage of the invention is that of allowing for a way of combining different inexpensive and relatively simple magnetic sensors to provide an angular magnetic sensor capable of measuring accurately and unambiguously the direction of a magnetic field over a full 360° range of measurement.

A sensor assembly according to the invention avoids the two alternative possible values for φ that may hamper a cheap, accurate and robust AMR sensor assembly for measuring the direction of a relatively strong magnetic field. This is solved by introducing Hall effect sensors or other low-grade sensors that are capable of carrying out a 360° measurement. For example, a first low-grade sensor is used for roughly measuring the direction of one of the applied field components and a second low-grade sensor is used to measure the other applied field component.

The invention allows for a general solution for an accurate high-field sensor system without the weaknesses inherent in prior solutions, as a magnetic sensor according to the invention can be configured to provide an unambiguous result in detected angle over the whole 360 degree range of detection.

An advantage of the invention is that the sensor apparatus can to a large extent be made independent from any inaccuracies in the output of the sensor of the second type, which only need to be used to provide an unambiguous indication of sign or interval of the sensed magnetic field. The logical combination of the two types of sensor allows for a determination of which sector the sensed magnetic field lies in. For applications where a full 360 degree sensing is required, the logical combination can determine unambiguously which octant (i.e. which out of the eight 45 degree intervals) the sensed magnetic field direction is in.

A particular feature of the invention is that only instantaneous signals from the sensors are required for the determination of the absolute direction of the sensed magnetic field. A history of the magnetic field direction is not required. A further advantage of the invention is therefore that the magnetic sensing apparatus is able to operate immediately upon start-up and is immediately as accurate as at any other time. This feature is important for certain safety critical applications and is required for zero-speed start-up brushless motor control applications.

The invention is described in further detail below by way of illustrative examples and with reference to the accompanying drawings, in which:

FIG. 1 is a schematic view of a pair of magnetoresistive sensor bridges and the relative orientation of an applied magnetic field;

FIG. 2 is a schematic plan view of a series of AMR sensor elements, each element having conductive ‘barber pole’ stripes to force electrical current through the sensor at 45 degrees to the sensing axis;

FIG. 3 is a schematic view of a pair of AMR ‘barber pole’ bridges;

FIGS. 4 a and 4 b are schematic illustrations of two die sensor assemblies having a pair of AMR sensors and a single or double Hall effect sensor;

FIG. 4 c is a diagram illustrating the relationship between the measured magnetic field N_(appl) and the axes of the sensor assemblies of FIGS. 4 a and 4 b;

FIGS. 5 a and 5 b are schematic plan views of two alternative arrangements for single die sensor assemblies;

FIGS. 6 a-d illustrate the relationships between output voltage signals from individual AMR and Hall sensors as a function of magnetic field angle;

FIG. 7 is a schematic diagram of a logic circuit for providing an output to determine a correction to be applied to an uncorrected angle signal;

FIG. 8 illustrates the variation in an uncorrected value for measured magnetic field angle as a function of the actual magnetic field angle;

FIGS. 9 a-c illustrate the variation and error in measured magnetic field angle as a function of actual magnetic field angle;

FIG. 10 a-h illustrate further variation in output voltage signals and measurement error as a function of actual magnetic field angle;

FIG. 11 illustrates the variation in an alternative uncorrected value for measured magnetic field angle as a function of the actual magnetic field angle;

FIG. 12 illustrates the variation in magnetic field angle measurement as a function of actual magnetic field angle with corrections applied;

FIG. 13 illustrates simulation results of the variation in measured output signals as a function of magnetic field angle; and

FIG. 14 is a flow diagram illustrating a method of carrying out the invention.

In various arrangements described herein, two Hall effect sensors are employed, these sensors being arranged with their magnetic field sensing axes substantially orthogonal to each other and configured to measure the direction of a magnetic field in the same plane. A double Hall effect sensor may be used for this purpose. Other types of magnetic field sensors may alternatively be used, provided these are capable of measuring over a 360 degree range of angles. Sensors for determining the direction of the magnetic field can be of relatively low grade, since they are effectively only used for determining the correct sign or interval of the measured magnetic field, while a more accurate orientation measurement is determined by another sensor. The purpose of the Hall effect sensors is therefore to reduce the possible values for φ to a single correct value for any angle within the full 360 degree range of the sensor assembly.

With the plane of detection of the sensor aligned according to x- and y-axes as shown in FIG. 1 d, a z-direction may be defined as being parallel to the direction of the axis of the rotor of an electric motor or parallel to the direction of the rotation axis of the crank of a combustion engine.

For relatively small applied fields, demagnetizing and anisotropy fields become more important. The relation between θ_(Mx) and φ can then become quite complicated, and can even depend on the magnetic history of the sensor. Proper DC biasing means and resetting means are then preferred or necessary for optimal operation of the device.

For maximum sensitivity at a small applied field with respect to demagnetizing, anisotropy and DC-bias fields, orientation of the current at about ±45 degrees with reference to the longitudinal axis of the magnetoresistive sensor is generally preferred. For this purpose, conductive stripes can be deposited on the sensors at ±45 degrees to the length direction of the sensors, as shown in FIG. 2 in which a schematic view of a part of an AMR sensor assembly is shown. Electrically conductive ‘barber pole’ stripes 202 are provided on top of each AMR sensor 201. The stripes 202 force electrical current 203 to pass through each AMR sensor at 45 degrees with respect to the length (x) direction of the sensors.

For maximum (magnetic) small-signal sensitivity of the above-described type of AMR sensors, it is necessary to orient the length direction of all sensors perpendicular to the component of the field to be measured. This means that a first bridge for sensing the y component of the applied field has all its sensors aligned along the x axis and a second bridge for sensing the x component of the applied field has all its sensors aligned along the y axis. This arrangement is illustrated in FIG. 3, with the orientations of the two AMR barber pole sensor bridges shown in FIGS. 3 a and 3 b, and a schematic illustration of a die having both bridges shown in FIG. 3 c. The output for small fields is a linear function of the component of the applied field component orthogonal to each sensor. Each sensor is not sensitive to the applied field component parallel to the sensor axis. The output of the bridge 301 in FIG. 3 c is V_(s1)∝H_(y)∝ sin φ and the second bridge 302 is V_(c1)∝H_(X)∝cos φ. The angle of the applied field, shown in FIG. 3 d, follows from the output of the 2 matched bridges according to the following: φ=arctan(V _(s1) /V _(c1))

By taking account of the signs of V_(c1) and V_(s1), a single unambiguous value for φ can be determined.

A disadvantage of such a sensor is that, at low fields, the sensor output can change sign when the magnetization along the length of the sensor element flips, for example due to a large magnetic field spike. When this happens only in part of the element, the overall amplitude of the output signal reduces. In an AMR sensor without the ‘barber pole’ stripes shown in FIG. 3, this has either very little or no effect.

For large fields the response of the above described ‘barber pole’ bridges becomes sensitive to the other component of the applied field as well, which makes this method unsuitable for large magnetic fields. Reducing the applied field source itself or partly shielding all external fields may avoid this. For many applications, particularly where maximum accuracy and reliability is required, reducing the applied field or providing appropriate shielding may not be an option. The contributions of disturbing fields from the external environment, which will increase in relative magnitude if the applied field source itself is decreased, as well as the contributions from disturbing forces and inaccuracies in the sensors themselves, will then have a deleterious impact on the response of the device.

A magnetic field sensor assembly according to embodiments of the present invention allows for a method of measuring the direction of a relatively strong magnetic field using cheap, accurate and robust AMR sensor technology, thereby avoiding the two possible values for φ in a full 360° measurement that may otherwise hamper accurate magnetic field angle detection. A relatively strong magnetic field can be defined to be a field that has a magnitude substantially larger than the net anisotropic field of the sensor, which represents the combined effect of the demagnetizing field of the element(s) and the intrinsic anisotropy of the AMR sensor material. Avoiding the two possible values for φ may be achieved by adding one or more (low-grade) 360° sensors so that a single unambiguous value of φ close to the actual direction of the local applied field can be determined.

Certain embodiments combine two AMR bridges with two Hall effect sensors, or alternatively with a double Hall sensor. The Hall sensors are used for detecting the sign or interval of the magnetic field, while the angular AMR sensors are used to accurately measure the angle of the local magnetic field over a 180° range. In combination, with appropriate processing as described in further detail below, this allows for an accurate and unambiguous determination of the direction of the magnetic field, without the separate limitations of the AMR sensors and Hall sensors.

Alternative implementations with a single and double Hall element are shown schematically in FIGS. 4 a and 4 b, with FIG. 4 c indicating the relative orientation of the applied magnetic field H_(appl) to the x and y axes of the sensors. FIG. 4 a shows a two-die sensor assembly 401 a, with a single Hall element 402 that is sensitive to the y component of the applied magnetic field H_(appl). The Hall element 402 may be implemented on a C-MOS die 403, with two AMR bridges 404 a, 404 b formed on a separate silicon die 405. The two dies 403, 405 are preferably placed in close proximity to one another, so that the magnetic field measurements are as similar as possible.

FIG. 4 b illustrates a two-die sensor assembly 401 b with a double Hall element 406 for measuring both x and y components of the field, the Hall element 406 being formed on the C-MOS die 403 and the pair of AMR bridges 404 a, 404 b on a separate silicon die. One or both of the dies 403, 405 preferably comprise the processing circuitry required to extract and process the signals from the sensors 404 a, 404 b, 402, 406. Operation of the processing circuitry is described in further detail below. The cross in the center of the Hall sensor 402, 406 indicates that the direction of the Hall current is perpendicular to the die (in the z-direction) in order to be able to measure the in-plane (x and y) field components.

Alternative single-die implementations are illustrated in FIGS. 5 a and 5 b. In FIG. 5 a, the AMR bridges 504 a, 504 b are formed on top of a C-MOS stack 503 a, with a double Hall sensor 506 a made in the C-MOS stack 503 a between the bridges 504 a, 504 b. In FIG. 5 b, both AMR bridges 514 a and 514 b are deposited on top of the C-MOS stack 503 b around the Hall sensor 506 b in the C-MOS stack, the AMR bridges having their axes centered with the axis of the Hall sensor. The embodiment in FIG. 5 b allows for all these axes to be aligned with the axis of a well aligned rotating external magnetic field source, resulting in an improved accuracy of measurement.

A further possible embodiment comprises two AMR bridges in the form shown in FIGS. 1 a and 1 b above in combination with one or more ‘barber pole’ type AMR sensor bridges in the form described above in relation to FIG. 2, The barber pole bridges may be configured such that the magnetic response is made sufficiently insensitive so that double-valued angles will not appear during operation. The signals of these low-sensitivity barber pole bridges can then be used for detecting the sign or interval of the magnetic field, while more sensitive angular AMR sensors are used to accurately measure the angle of the local magnetic field within ranges of 180°.

The sensitivity of the barber pole type bridges may be reduced by shielding the bridges, for example by means of a cladding layer on top of the sensor, or by increasing the demagnetization field of the sensor, for example through use of a small sensor element width or a large AMR thickness.

The above low-grade bridge for the detection of the field sign or interval based on barber pole type AMR sensors can be made much smaller than the angular sensor bridges, because of its smaller sensor element width for low magnetic sensitivity and because a smaller signal to noise ratio can be tolerated compared with the more accurate angular sensor bridges.

A disadvantage of barber pole type sensor elements is that the output curve changes its sign when the magnetization in the whole element flips, for example due to a large field spike. This would lead to a wrong determination of the sign or interval of the applied field. A reduced sensitivity results if only a small part of the element flips, which would not generally be a problem in the present application. Such dramatically wrong state might be permanent until a next large field pulse would occur.

However, the current in the barber pole stripes during operation of the device may cause a net field in the AMR element with components in length and transverse direction. The current-field component in the length direction adds to the anisotropy ‘field’ when the magnetization has a component in the preferred length direction and decreases the net anisotropy ‘field’ for a magnetization in the opposite length direction. The latter is the case when the magnetization flipped in the past. For a sufficiently large sense current, the field from the sense current during operation always forces the magnetization back to have a component in the preferred length direction. In addition, this field from the current roughly doubles when the above shielding is used for reducing the magnetic sensitivity of the barber pole AMR element.

Increased demagnetization makes the anisotropy stronger. This reduces the change that flipping occurs, but unfortunately also requires larger sense currents to remove the semi-permanent effect of flipping.

Prior to operation, a very short and strong current in the direction of the sense current might be applied to overcome one or more of the above problems.

In all the above implementations, a relatively low-grade sensor is provided in the vicinity of a pair of AMR bridges. Alignment of the AMR bridges with respect to the rotation axis of the source of the applied magnetic field (for example the rotation axis of the shaft of the rotor of a brushless motor on which the applied field magnet may be mounted) is important for an accurate measurement of the angle of the magnet.

The lateral distance from the accurate bridges to the low-grade bridges should be relatively short compared to the distance to the magnet, which is usually easy to fulfill. In a single-die implementation this lateral distance can be made to be effectively zero.

Simulated signals resulting from an exemplary arrangement of sensors and bridges are shown in FIGS. 6 a-d. In these figures:

-   -   V_(c2) and V_(s2) are the signals from the accurate 180° angular         AMR bridges;     -   V_(c2) and V_(s2) are the signals from the low-grade 360°         angular bridges (e.g. Hall effect bridges);     -   D_(c2) and D_(s2) are digital representations of the sign of         V_(c2) and V_(s2), i.e. D_(c2)=1 if V_(c2)>0 and 0 otherwise;         and     -   D_(c1) and D_(s1) are digital representations of the sign of         V_(c1) and V_(s1), i.e. D_(c1)=1 if V_(c1)>0 and 0 otherwise.

In each of the graphs of FIGS. 6 a-d, the output signal of the sensor as a function of actual applied field angle is shown. For V_(c2) this is a double cosine relationship, and for V_(s2) is a double sine relationship.

An artificial disturbing signal is added to the signals for V_(c1) and V_(s1) in FIGS. 6 c and 6 d, in order to demonstrate the advantages of combining two low-grade sensors to obtain an unambiguous direction measurement.

The following terms are used in describing the outputs of the exemplary embodiments:

-   -   φ_(u), is an uncorrected angle output from the pair of AMR         bridges, derived from (φ_(u)=(½) arctan(V_(s2)/V_(c2));     -   (φ_(l) is an angle output obtained from the low-grade sensors,         derived from φ_(l)=(½) arctan(V_(s1)N_(c1)); and     -   (φ_(c) is a corrected angle, obtained from         (φ_(c)=(φ_(u)+D10_(x)*180, where the block function D10_(x) is 0         or 1 depending on one or more of the above signals.

As shown in FIGS. 6 a-d, digital signals D_(a), D_(s2), D_(c1), D_(s1) are derived from V_(a), V_(s2), V_(c1) and V_(s1) for determining in which portion of the whole 360° range a measured angle is located. The signals may be derived from a pair of AMR bridges and a double Hall sensor, as described above. Low sensitivity barber pole AMR sensors may be used as an alternative to Hall sensors.

In the signals illustrated in FIGS. 6 a-d, strong AC and DC error signals are added to all signals to show the reliability of the proposed method. These are particularly evident in signals V_(c1) and V_(s1) 601, 602 from the Hall sensor elements, where the simulated disturbances result in large errors in the resulting digital signals D_(c1), D_(s1) 603, 604. Exactly the same error signal is applied to the voltage outputs V_(c2), V_(s2) 605, 606, but because of the 10 times higher sensitivity of the accurate bridges it results in much smaller errors in the digital signals D_(c2), D_(s2) 607, 608. The digital signals D_(c2), D_(s2), D_(c1), D_(s1) are used in logical combinations to unambiguously identify the portion of the 360° range in which a measurement is being made.

From these logical combinations, a single digital signal D10_(x) is derived that determines whether or not 180° will be added to the angle (φ_(u), already derived from the accurate AMR sensors.

For only one Hall sensor, providing outputs Vc1, Dc1, the logical test D10_(x), termed D10_(r), is the following: D10r=If[!Dc1,1,0].

Where two Hall sensors are used, providing outputs V_(c1), D_(c1), V_(s1), D_(s1), the logical test D10_(x), now termed D10_(e), is the following: D10_(e)=IF[((!Dc2&&!Ds2)&&Ds1)∥((!Dc2&&!Ds2)&&!Dc1)∥((Dc2&&Ds 2)&&!Ds1)∥((!Dc2&&!Ds2)&&!Ds1),1,0)

In the above logical tests, the notation is as follows:

! means NOT;

&& means AND;

∥means OR; and

,1,0 means THEN 1 ELSE 0.

The IF statements above are used to make the transition from the logic operations True-False to the digital levels 1-0.

Shown in FIG. 7 is an exemplary implementation of the above way of determining the digital control signal D10_(e), in the form of a combination of logical elements taking the inputs Dc1, Ds1, Dc2 and Ds2 and combining these according to the above logical relationship. The logical relationship for D10_(e) can alternatively be expressed as follows:

${D\; 10\; e} = \begin{matrix} \left( \left( {D_{C\; 2}==0} \right) \right. & \bigwedge & {\;\left( {D_{S\; 2}==0} \right)} & \bigwedge & \left. \left( {D_{S\; 1}==1} \right) \right) & \bigvee \\ \left( \left( {D_{C\; 2}==1} \right) \right. & \bigwedge & \left( {D_{S\; 2}==0} \right) & \bigwedge & \left. \left( {D_{C\; 1}==0} \right) \right) & \bigvee \\ \left( \left( {D_{C\; 2}==1} \right) \right. & \bigwedge & \left( {D_{S\; 2}==1} \right) & \bigwedge & \left. \left( {D_{C\; 1}==0} \right) \right) & \bigvee \\ \left( \left( {D_{C\; 2}==0} \right) \right. & \bigwedge & \left( {D_{S\; 2}==1} \right) & \bigwedge & \left. \left( {D_{S\; 1}==0} \right) \right) & \; \end{matrix}$

where the signals D_(c2), D_(s2), D_(c1), D_(s1) represent digital signals (1 or 0) rather than logic signals (True or False), the symbol

indicates AND, and the symbol

indicates OR.

In the circuit shown in FIG. 7, each O symbol next to an AND module represents an inversion operation (i.e. 1->0 and 0->1). The AND module blocks (indicated by an ‘&’ symbol) provide outputs equalling 1 only if all inputs are 1. The final block in the circuit provides a 1 output if at least one of the inputs is 1, i.e. the block represents an OR logical module. If the control signal D10_(e)=1, an angle of 180° is to be added to the uncorrected angular output φ_(u).

As shown in FIG. 8, the relationship of φ_(u) as a function of actual angle φ is divided into 8 intervals, or octants. The logical tests denoted in each interval are those that are either known, or are likely to be true, in that interval. A first logical test, indicated above the (φ-axis, is associated with the accurate 180° sensors, and a second logical test, indicated below the (φ-axis, is associated with the less accurate 360° sensors. For the low-grade sensors this indicates the most reliable quantity for a given interval. The logical tests used in each interval are summarised in the table below.

TABLE 1 Logical tests over 8 intervals of φ. Logical Interval φ Test 1 Logical Test 2 1  0-45° Dc1 Dc2&&Ds2 2 45-90° Ds1 !Dc2&&Ds2 3  90-135° Ds1 !Dc2&&!Ds2 4 135-180° !Dc1 Dc2&&!Ds2 5 180-225° !Dc1 Dc2&&Ds2 6 225-270° !Ds1 !Dc2&&Ds2 7 270-315° !Ds1 !Dc2&&!Ds2 8 315-360° Dc1 Dc2&&!Ds2

It can be readily determined that the logical test D10_(e) results in an unambiguous output of sign or interval for φ provided any zero-crossing errors in the low-grade signals do not exceed 45°.

The output of the logical test can be used to apply a correction to the uncorrected angle φ_(u), resulting in a corrected angle, φ_(c). A correction of 360° may be added for negative values of φ_(u). When using only one low-grade sensor: φ_(c1)=φ_(u)+180D10_(r) φ_(c)=φ_(c1)=IF[(φ_(c1)<0,360,0]

This results in 180° errors being corrected around where φ=90° and φ=270°.

When using two low-grade sensors, the above test D10_(e), derived from the output of both sensors, is used: φ_(c2)=φ_(u)+180D10_(e) φ_(c)=φ_(c2)=IF[(φ_(c2)<0,360,0]

The results for each of the above approaches are shown in FIGS. 9 a and 9 b. FIG. 9 a illustrates the output corrected angle φ_(c) using only one low-grade sensor, and FIG. 9 b illustrates the output corrected angle using two low-grade sensors. In FIG. 9 a, portions of the output corrected angle are clearly in error, resulting from uncertainties in the sign of the signal from the low-grade sensor. In FIG. 9 b, on the other hand, no such large scale errors are visible in the corrected angle output. This is further confirmed in FIG. 9 c, in which the error in the corrected angle is shown as a function of actual angle. This error is completely due to measurement errors in the accurate 180° sensors and not at all due to the (much larger) errors in the 360° sensors.

It has therefore been shown that the use of 2 low-grade 360° sensors in logical combination can result in the complete removal of all ambiguities for determining a corrected angular measurement of magnetic field. The accuracy of the corrected signal is completely independent of any inaccuracy in the outputs of the low-grade sensors, provided that any uncertainties in such sensors do not exceed 45°.

In a further example, the results of which are illustrated in FIGS. 10 a to 10 h, the errors in V_(c2) and V_(e2) have been made larger. This is not necessarily a realistic simulation, but demonstrates that the 180° correction scheme based on the logical test D10_(e) above works well in avoiding any ambiguity in the angle determination, even under extreme circumstances.

In FIGS. 10 a and 10 b, substantial DC and AC errors were applied to the voltage outputs V_(c2), V_(e2). In FIGS. 10 c and 10 d, similar errors are shown to those applied in the example above. FIG. 10 e illustrates the uncorrected angle, φ_(u), and FIGS. 10 f and 10 g illustrate the corrected angle outputs when using a single low-grade sensor (FIG. 10 f) and two low-grade sensors (FIG. 10 g). FIG. 10 h illustrates the error signal in the corrected output of FIG. 10 g, which again is solely due to the errors in the higher grade sensors.

In the case where an operation to determine φ_(u)=(½) arctan(V_(s2)/V_(c2)) is not available, for example where only a look-up table for a more simplified arctan [x] function is available, i.e. one that does not take account of the signs of both V_(e2) and V_(c2), then the uncorrected angle φ_(u), illustrated in FIG. 11 results. The uncorrected angle ranges over only 90°, rather than 180°. A combination of the digitised versions of the output signals from all sensors can be used to determine what correction needs to be made to obtain the corrected angle φ_(c).

As before, the 360° range is divided into 8 intervals 1-8. For the desired unambiguous output:

-   -   in intervals 2 and 3, 90° has to be added     -   in intervals 4 and 5, 180° has to be added     -   in intervals 6 and 7, 270° has to be added; and     -   in interval 8, 360° has to be added.

One way of implementing the above corrections is through the use of logical values D_(s2) and D_(a) to obtain the uncorrected φ_(u), of FIG. 8, and then to proceed with the logical operations as used earlier. The most straightforward way, however, is to perform above operations in one step using all the logic quantities given in each interval for the unambiguous ascertainment of each interval. This leads to the following expression for performing all the necessary operations:

φ_(c) = φ_(u) + If[((\!Dc 2&&Ds 2)(\!Dc 2&&\!Ds 2))&&Ds 1, 90, 0] + If[((Dc 2&&\!Ds 2)(Dc 2&&Ds 2))&&\!Dc 1, 180, 0] + If[((\!Dc 2&&Ds 2)(\!Dc 2&&\!Ds 2))&&\!Ds 1, 270, 0] + If[(Dc 2&&\!Ds 2)&&Dc 1, 360, 0]

The result of this is the same as the output shown in FIG. 9 b.

In the following two examples, the results of which are illustrated in FIGS. 12 and 13, an alternative octant prediction circuit is applied. This alternative circuit provides the digital control signal D10_(q), determined according to the following relationship:

${{D\; 10\; q} = \begin{matrix} \left( \left( {D_{C\; 1}==0} \right) \right. & \bigwedge & {\;\left( {D_{S\; 1}==0} \right)} & \bigwedge & \left. \left( {\varphi_{U} > {- 45^{\circ}}} \right) \right) & \bigvee \\ \left( \left( {D_{C\; 1}==0} \right) \right. & \bigwedge & \left( {D_{S\; 1}==1} \right) & \bigwedge & \left. \left( {\varphi_{U} < 45^{\circ}} \right) \right) & \bigvee \\ \left( \left( {D_{C\; 1}==1} \right) \right. & \bigwedge & \left( {D_{S\; 1}==1} \right) & \bigwedge & \left. \overset{\_}{\left( {\varphi_{U} > {- 45^{\circ}}} \right)} \right) & \bigvee \\ \left( \left( {D_{C\; 1}==1} \right) \right. & \bigwedge & \left( {D_{S\; 1}==0} \right) & \bigwedge & \left. \overset{\_}{\left( {\varphi_{U} < 45^{\circ}} \right)} \right) & \; \end{matrix}},$

where, as before, the symbol

means AND, and the symbol

means OR. If the control signal D10_(q)=1, an angle of 180° will be added to φ_(u) to obtain φ_(c). Note that in contrast to the previous choice D10e a calculation of φ_(u) is necessary prior to performing above logical operation. Using the above relationship, a calculation can be made of a ‘worst case’ scenario, where the angular errors of each Hall sensor (or switch) are made artificially large:

The angle error of the D_(c1) Hall switch −40° The angle error of the D_(s1) Hall switch +40° The AMR element has an additional phase error ±2°

FIG. 12 illustrates the system behavior in this case, demonstrating again the relative insensitivity of the sensor system against errors, using another logical detection scheme than in the earlier examples.

Again, the total angle error is only determined by the AMR element and is independent of the large angle error of the Hall switches. This error, of about 2°, is present at all angles, but effects of its existence are only clearly visible around the mechanical angle φ=0° where the angle error causes (irrelevant) switches of φ_(c) from 0° to 360° and vice versa at φ=+ and −2°

For a high speed application such as in a brushless motor, the calculation effort for the 360° capability is typically large, because the equation uses the angle information φ_(u).

FIG. 13 illustrates simulation results demonstrating how the measurement system operates in response to a power-on reset. Various existing sensor systems for making angular measurements take account of a sensed magnetic field history in order to make the right decision when two or more possible actual angles can result from instantaneous output signals. The most likely quadrant (or octant, etc.) in which the actual angle is present is therefore predicted from the history of the sensor output rather than from the signals measured at that particular moment. For embodiments of the invention described herein, only the signals measured at any particular moment need to be used for determining the 2 or more possible angles at that moment.

A consequence of the method of calculation is that the start-up (after power on) behavior is no different to the behavior under any other circumstance. FIG. 13 shows the result of a variation of the start-up angle (from 0° up to 360° in 1° steps) in simulations, and clearly indicates that this has no effect at all on the error. For each start-up angle, 2187 different parameter combinations were simulated. The result for each case is an error flag, which goes high (=1) if an ‘octant decision error’ is detected, which means that the maximum total angle error is larger then approximately 45°. No errors were detected during the simulation over the entire range of sensed angles. The sensor system is therefore expected to be robust on start-up as well as during normal operation.

For the parametric ‘sweep’, the following discrete values were used as system tolerances, and Hall effect sensors were assumed, configured to measure over a 360 degree range.

AMR offset (twice) [−45 0 45] percent of output amplitude AMR phase error [−1 0 1] ° Hall electrical offset (twice) [−15 0 15] percent of output amplitude Hall switches angle error (twice) [−20 0 20] ° Start up angle [0:1:360] °

The offset errors in both AMR bridges were varied independently from each other. The same is assumed for the angle errors of both parts of the Hall sensor. Only the phase errors in both AMR sensors are assumed to be equal, because it is likely that these errors are mainly due to misalignment of the die on which both sensors are placed.

In general, the octant prediction circuits described herein will operate perfectly provided the sum of all possible error sources is smaller than 45°, as was the case for all possible combinations in the above described simulation. The following equation provides a rough criterion for the allowable tolerances.

${{\Delta\varphi}_{AMR} + {\Delta\varphi}_{Hall} + {0.42*{offset}_{AMR}} + {\frac{90}{\pi}*{\arcsin\left( \frac{{offset}_{HALL}}{100} \right)}}} \leq 45^{\circ}$

where Δφ is the phase shift of the sinusoidal signal in degrees and the term offset is the relative offset in percentage of signal amplitude (i.e. half of the top-top value). The units for the tolerances in this criterion are as used in the above tolerance lists. FIG. 14 illustrates in a general aspect a method of performing the invention in the form of a flow diagram, comprising a single sequence of steps from start (step 141) to finish (step 147). In practice, the method will be carried out repeatedly, typically many times each second depending on the frequency at which the output measurement angle needs to be updated. At step 142, output signals from the AMR sensors, V_(c2), V_(s2), are measured. This also results in values being obtained for D_(a), D_(s2). At step 143, output signals from the Hall effect sensors, V_(c1), V_(s1), are measured, which also results in values being obtained for D_(c1), D_(s1). Steps 142, 143 may be carried out simultaneously, in parallel or in an alternate order. At step 144, the uncorrected angle, φ_(u), is determined from the AMR sensor outputs V_(c2), V_(s2). The logical test D10_(x), as described above, is then applied to determine the correct offset to add to the uncorrected angle. The corrected angle, φ_(c), is then output at step 146 and the process ends (step 147).

Other embodiments are intentionally within the scope of the invention as defined by the appended claims. 

The invention claimed is:
 1. A magnetic field sensor assembly configured to measure an angular direction (φ) of a sensed magnetic field (H_(appl)) relative to the assembly, the sensor assembly comprising: a sensor of a first type configured to sense an orientation of the sensed magnetic field; a sensor of a second type, comprising at least one Hall effect sensor, that is configured to measure the orientation and a direction of the sensed magnetic field; and processing circuitry connected to each of the magnetic field sensors, the processing circuitry being configured to process output signals from the sensor of the first type to determine an uncorrected sensed magnetic field angle and to apply an offset angle to the uncorrected magnetic field angle dependent on a logical combination of signs of output signals from the sensors of the first and second types, wherein the sensor of the first type and the sensor of the second type are formed on a single die, and wherein the at least one Hall sensor is located between first and second sensor bridge.
 2. The magnetic field sensor assembly of claim 1, wherein the sensor of the first type comprises: at least two magnetoresistive sensor elements.
 3. The magnetic field sensor assembly of claim 1 wherein the sensor of the second type comprises: at least two magnetoresistive sensor elements having electrodes comprising electrically conductive stripes oriented at an angle to the length direction of the sensor so as to direct electrical current to pass through the sensor at 45 degrees with respect to the length direction of each sensor element.
 4. The magnetic field sensor assembly of claim 1, wherein the sensor of the second type comprises a double Hall element.
 5. The magnetic field sensor of claim 1, wherein the sensor of the first type comprises: first and second sensor bridges having magnetic field sensing axes oriented at an angle relative to each other.
 6. The magnetic field sensor of claim 5, wherein the first and second sensor bridges each comprise: at least one magnetoresistive element.
 7. The magnetic field sensor of claim 6, wherein the first and second sensor bridges are oriented at approximately 45 degrees relative to each other.
 8. The magnetic field sensor of claim 1, wherein the sensor of the second type comprises: first and second sensors having magnetic field sensing axes oriented at an angle relative to each other.
 9. The magnetic field sensor of claim 8, wherein the angle is approximately 90 degrees.
 10. The magnetic field sensor assembly of claim 1, wherein the uncorrected magnetic field angle has a 180 degree range, and the processing circuitry is configured to apply an offset angle of 180 degrees when a logical combination of signs of the output signals indicate the sensed magnetic field is oriented between 180 and 360 degrees relative to the assembly.
 11. The magnetic field sensor assembly of claim 10, wherein the logical combination is: !Dc2 AND !Ds2 AND Ds1; OR Dc2 AND !Ds2 AND !Dc1; OR Dc2 AND Ds2 AND !Dc1; OR !Dc2 AND Ds2 AND !Ds1, where Dc2 and Ds2 are logical values indicating signs of the output signals from the sensor of the first type, and Dc1 and Ds1 are logical values indicating signs of output signals from the sensor of the second type, with !Dc1, !Ds1, !Dc2 and !Ds2 being the logical inverse of Dc1, Ds1, Dc2 and Ds2 respectively.
 12. The magnetic field sensor assembly of claim 1, wherein the uncorrected magnetic field angle has a 90 degree range and the processing circuitry is configured to apply an offset angle of one of 90, 180, 270 and 360 degrees when a logical combination of the signs of the output signals indicate the sensed magnetic field is oriented between 45 and 135 degrees, 135 and 225 degrees, 225 and 315 degrees, and 315 and 360 degrees respectively relative to the assembly.
 13. The magnetic field sensor assembly of claim 12 wherein the processing circuitry is configured to: apply an offset angle of 90 degrees when the logical combination is ((!Dc2 AND Ds2 ) OR (!Dc2 AND !Ds2 )) AND Ds1; apply an offset angle of 180 degrees when the logical combination is ((Dc2 AND !Ds2 ) OR (Dc2 AND Ds2 )) AND !Dc1; apply an offset angle of 270 degrees when the logical combination is ((!Dc2 AND Ds2 ) OR (!Dc2 AND !Ds2 )) AND !Ds1; and apply an offset angle of 360 degrees when the logical combination is Dc2 AND !Ds2 AND Dc1, wherein Dc2 and Ds2 are logical values indicating signs of the output signals from first and second sensors of the first type and Dc1 and Ds1 are logical values indicating signs of output signals from the first and second sensors of the second type, with !Dc1, !Ds1, !Dc2 and !Ds2 being logical inverse inverses of Dc1, Ds1, Dc2 and Ds2 respectively.
 14. The magnetic field sensor assembly of claim 1, wherein first and second sensor bridges are deposited on top of a CMOS stack around the at least one Hall sensor.
 15. The magnetic field sensor assembly of claim 14, wherein axes of the first and second sensor bridges are centered with an axis of the Hall sensor.
 16. A method of measuring an angular direction of a magnetic field, the method comprising: measuring an orientation of the magnetic field with a sensor of a first type; measuring the orientation and a direction of the magnetic field with a sensor of a second type comprising at least on Hall effect sensor; processing output signals from the sensor of the first type to determine an uncorrected sensed magnetic field angle; and applying an offset angle to the uncorrected magnetic field angle dependent on a logical combination of signs of output signals from the sensors of the first and second types to obtain an output signal of the angular direction of the magnetic field, wherein the sensor of the first type and the sensor of the second type are formed on a single die, and wherein the at least one Hall sensor is located between first and second sensor bridge. 